import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { NavLink } from 'react-router-dom';

import ContentLayout from '@/component/common/ContentLayout';
import contractStyle from '@/page/contract/contract.scss';

class Layout extends Component {
    static propTypes = {
        children: PropTypes.node,
        loading: PropTypes.bool
    };
    render() {
        return (
            <ContentLayout navTitle="合同" loading={this.props.loading}>
                <div className={contractStyle['contract-wrap']}>
                    <div className={contractStyle['contract-nav']}>
                        <NavLink exact to="/合同" activeClassName={contractStyle['active']}>合同审核</NavLink>
                        <NavLink exact to="/合同/合同列表" activeClassName={contractStyle['active']}>合同列表</NavLink>
                        <NavLink exact to="/合同/佣金合同" activeClassName={contractStyle['active']}>佣金合同</NavLink>
                    </div>
                    {this.props.children}
                </div>
            </ContentLayout>
        );
    }
}

export default Layout;